Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(torii-core): WAL journal mode & remove max conns #2439

Merged
merged 9 commits into from
Sep 19, 2024

Conversation

Larkooo
Copy link
Collaborator

@Larkooo Larkooo commented Sep 17, 2024

Summary by CodeRabbit

  • New Features
    • Improved performance and resource management for SQLite database connections with enhanced configuration options.
    • Introduced specific performance settings for SQLite connections, including disabling auto-vacuum, setting journal mode to Write-Ahead Logging (WAL), and configuring synchronous behavior to normal.
    • Added flexibility for using an in-memory database configuration when specified.

Copy link

coderabbitai bot commented Sep 17, 2024

Walkthrough

Ohayo, sensei! The changes introduced in this pull request enhance the SQLite connection configuration in the main function of the bin/torii/src/main.rs file. The implementation now explicitly sets performance-related options for the SQLite connection, including disabling auto-vacuum, setting the journal mode to Write-Ahead Logging (WAL), and configuring synchronous behavior to normal. These adjustments streamline the connection setup by optimizing it from the outset and removing the need for previous SQL commands.

Changes

Files Change Summary
bin/torii/src/main.rs Enhanced SQLite connection options by explicitly setting performance parameters: disabled auto-vacuum, set journal mode to WAL, and configured synchronous behavior to normal. Streamlined connection setup by removing previous SQL commands.

Sequence Diagram(s)

sequenceDiagram
    participant App as Application
    participant DB as Database
    App->>DB: Establish connection with performance options
    DB->>DB: Disable auto-vacuum
    DB->>DB: Set journal mode to WAL
    DB->>DB: Configure synchronous behavior to normal
Loading

Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9067289 and cd564a9.

Files selected for processing (1)
  • bin/torii/src/main.rs (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • bin/torii/src/main.rs

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai generate interesting stats about this repository and render them as a table.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Tip

Early access features: enabled

We are currently testing the following features in early access:

  • OpenAI o1 for code reviews: OpenAI's new o1 model is being tested for code reviews. This model has advanced reasoning capabilities and can provide more nuanced feedback on your code.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 21ec45e and 70d7d5d.

Files selected for processing (1)
  • bin/torii/src/main.rs (1 hunks)

bin/torii/src/main.rs Outdated Show resolved Hide resolved
@Larkooo Larkooo changed the title fix(torii-core): sqlite shared cache chore(torii-core): sqlite shared cache Sep 17, 2024
@Larkooo Larkooo changed the title chore(torii-core): sqlite shared cache chore(torii-core): disable timeout Sep 17, 2024
@Larkooo Larkooo changed the title chore(torii-core): disable timeout chore(torii-core): shared cache for inmemory Sep 17, 2024
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 68.22%. Comparing base (21ec45e) to head (cd564a9).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
bin/torii/src/main.rs 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2439      +/-   ##
==========================================
+ Coverage   68.21%   68.22%   +0.01%     
==========================================
  Files         365      365              
  Lines       48022    48018       -4     
==========================================
+ Hits        32757    32761       +4     
+ Misses      15265    15257       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Larkooo Larkooo changed the title chore(torii-core): shared cache for inmemory chore(torii-core): WAL journal mode & remove max conns Sep 18, 2024
@glihm glihm merged commit 7c5a1f5 into dojoengine:main Sep 19, 2024
14 of 15 checks passed
@kariy kariy mentioned this pull request Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants